home *** CD-ROM | disk | FTP | other *** search
/ Sports Illustrated Swims… Screen Saver (Alternate) / Sports Illustrated Swimsuit Calendar & Screen Saver.iso / win31 / init.inc < prev    next >
Text File  |  1995-05-07  |  17KB  |  357 lines

  1. SUB InitDefaultPaths STATIC
  2.   EXE_PATH$ = "EXE_PATH"
  3.   PREV_INSTALL$ = "PREV"
  4.   SetSymbolValue PREV_INSTALL$, "NO"
  5.  
  6.   WINDRIVE$ = MID$ (WinDir$, 1, 1)
  7.   nWinDrive% = ASC (ucase$ (WINDRIVE$)) - ASC ("A") + 1
  8.  
  9.   ini$ = MakePath (GetWindowsDir, "POWERUP.INI")
  10.  
  11.   '' the old smart way
  12.   ''
  13.   '' set CCW's program path
  14.   ''DEST$ = LCASE$ (GetIniKeyString (ini$, _CCW$, "ProgramPath"))
  15.   ''IF DEST$ = "" THEN
  16.   ''  DEST$ = LCASE$ (GetIniKeyString (ini$, "POWERALBUM", "Path"))
  17.   ''ENDIF
  18.   ''IF DEST$ = "" THEN
  19.   ''  DEST$ = LCASE$ (MakePath(RootDir$, _INSTALL_PATH$))
  20.   ''ELSE
  21.   ''  ii% = DoesFileExist (MakePath (DEST$,_EXE_NAME$), femExists)
  22.   ''  szVerStr$ = GetVersionOfFile (MakePath (DEST$, _EXE_NAME$))
  23.   ''  ver& = GetVersionNthField (szVerStr$, 1)
  24.   ''  if (ii% = 1) AND (ver& >= 2 ) then
  25.   ''    SetSymbolValue PREV_INSTALL$, "YES"
  26.   ''  endif
  27.   ''ENDIF
  28.   ''
  29.   '' the new way    
  30.   DEST$ = LCASE$ (MakePath(RootDir$, _INSTALL_PATH$))
  31.  
  32.   
  33.   '' pick up art directory from POWERUP.INI
  34.   ''
  35.   '' the old way
  36.   ''DEST_ART$ = LCASE$ (GetIniKeyString (ini$, "ART", "Path"))
  37.   ''IF DEST_ART$ = "" THEN
  38.   ''  DEST_ART$ = LCASE$ (MakePath(DEST$, "ART"))
  39.   ''ENDIF
  40.   ''
  41.   '' the new way
  42.   ''
  43.   DEST_ART$ = LCASE$(MakePath(DEST$, "ART"))
  44.  
  45.   '' pick up graphics filters directory from POWERUP.INI
  46.   ''
  47.   '' the old way
  48.   ''
  49.   '' DEST_FILTERS$ = LCASE$ (GetIniKeyString (ini$, "GRAPHICS FILTERS", "NewPath"))
  50.   '' IF DEST_FILTERS$ = "" THEN
  51.   ''   DEST_FILTERS$ = LCASE$ (GetIniKeyString (ini$, "GRAPHICS FILTERS", "Path"))
  52.   ''   if DEST_FILTERS$ = "" then
  53.   ''     DEST_FILTERS$ = LCASE$ (MakePath( DEST$, "FILTERS"))
  54.   ''   ENDIF
  55.   '' ENDIF
  56.   ''
  57.   '' the new way
  58.   ''
  59.   DEST_FILTERS$ = LCASE$ (MakePath( DEST$, "FILTERS"))
  60.  
  61.   SetSymbolValue EXE_PATH$, DEST$
  62.  
  63.   PROGDRIVE$ = MID$ (DEST$, 1, 1)
  64.   ARTDRIVE$ = MID$ (DEST_ART$, 1, 1)
  65.   FILTERSDRIVE$ = MID$ (DEST_FILTERS$, 1, 1)
  66. END SUB
  67.  
  68. SUB InitMainDialogSymbols STATIC
  69.   STR_REQ$ = "StrSelReq"
  70.   STR_AVAIL$ = "StrSelAvail"
  71.   DIALOG_LIST$ = "DialogList"
  72.   CHK_PROG_FILES$ = "ChkProgFiles"
  73.   CHK_STD_EVNT_LST$ = "ChkStdEvntLst"
  74.   CHK_INTL_EVNT_LST$ = "ChkIntlEvntLst"
  75.   CHK_WORK_SPCS$ = "ChkWorkSpcs"
  76.   CHK_CLIP_ART$ = "ChkClipArt"
  77.   RAD_ALBUM_ONLY$ = "RadAlbumOnly" '' dfg
  78.   RAD_BUILD_ALBUM$ = "RadBuildAlbum"
  79.   RAD_ART_ONLY$ = "RadArtOnly"
  80.   STR_PROG_PATH$ = "StrProgPath"
  81.   STR_CLIP_ART_PATH$ = "StrClipArtPath"
  82.   STR_FILTERS_PATH$ = "StrFiltersPath"
  83.   STR_REQ_PROG$ = "StrReqProg"
  84.   STR_REQ_CLIP_ART$ = "StrReqClipArt"
  85.   STR_REQ_FILTERS$ = "StrReqFilters"
  86.   STR_AVAIL_PROG$ = "StrAvailProg"
  87.   STR_AVAIL_ART$ = "StrAvailArt"
  88.   STR_AVAIL_FILTERS$ = "StrAvailFilters"
  89.   STR_REQ_PROG2$ = "StrReqProg2"
  90.   STR_REQ_SEL$ = "StrReqSEL"
  91.   STR_REQ_IEL$ = "StrReqIEL"
  92.   STR_REQ_WK_SPC$ = "StrReqWkSpc"
  93.   STR_REQ_CLIP_ART2$ = "StrReqClipArt2"
  94.   STR_REQ_ART_DLG$ = "STR_REQ_ART_DLG$"
  95.   STR_AVAIL_ART_DLG$ = "STR_AVAIL_ART_DLG$"
  96.   STR_REQ_GEN$ = "STR_REQ_GEN$"
  97.   STR_AVAIL_GEN$ = "STR_AVAIL_GEN$"
  98.  
  99.   SetSymbolValue STR_REQ_ART_DLG$, "0"
  100.   SetSymbolValue STR_AVAIL_ART_DLG$, "0"
  101.   SetSymbolValue CHK_PROG_FILES$, "ON"
  102.   SetSymbolValue CHK_STD_EVNT_LST$, "ON"
  103.   SetSymbolValue CHK_INTL_EVNT_LST$, "ON"
  104.   SetSymbolValue CHK_WORK_SPCS$, "ON"
  105.   SetSymbolValue CHK_CLIP_ART$, "ON"
  106.   SetSymbolValue RAD_ALBUM_ONLY$, "ON"   '' dfg
  107.   SetSymbolValue RAD_BUILD_ALBUM$, "OFF" '' dfg
  108.   SetSymbolValue RAD_ART_ONLY$, "OFF"
  109.   SetSymbolValue STR_PROG_PATH$, DEST$
  110.   SetSymbolValue STR_CLIP_ART_PATH$, DEST_ART$
  111.   SetSymbolValue STR_FILTERS_PATH$, DEST_FILTERS$
  112.   SetSymbolValue STR_REQ_PROG$, "0"
  113.   SetSymbolValue STR_REQ_CLIP_ART$, "0"
  114.   SetSymbolValue STR_REQ_FILTERS$, "0"
  115.   SetSymbolValue STR_AVAIL_PROG$, "0"
  116.   SetSymbolValue STR_AVAIL_ART$, "0"
  117.   SetSymbolValue STR_AVAIL_FILTERS$, "0"
  118.   SetSymbolValue STR_REQ_PROG2$, "0"
  119.   SetSymbolValue STR_REQ_SEL$, "0"
  120.   SetSymbolValue STR_REQ_IEL$, "0"
  121.   SetSymbolValue STR_REQ_WK_SPC$, "0"
  122.   SetSymbolValue STR_REQ_CLIP_ART2$, "0"
  123. END SUB
  124.  
  125. SUB InitArtDialogSymbols STATIC
  126.   DIA_ART$="DiaArtChk"
  127.   AddListItem DIALOG_LIST$, DIA_ART$
  128.  
  129.   CHK_ART01$ = "ChkArt01"
  130.   AddListItem DIA_ART$,    CHK_ART01$      '' add checkbox to dialog list
  131.   AddListItem CHK_ART01$, "ON"             '' status
  132.   AddListItem CHK_ART01$, "ON"             '' temp status -- used for dialogs
  133.   AddListItem CHK_ART01$, "ART01"          '' file section in LYT/INF file
  134.   AddListItem CHK_ART01$, "301"            '' dialog template ID
  135.   AddListItem CHK_ART01$, "0"              '' disk cost of checked item
  136.   AddListItem CHK_ART01$, "alb01.alb"      '' name of category album
  137.   AddListItem CHK_ART01$, "alb01"          '' LYT/INF section for album file
  138.   AddListItem CHK_ART01$, "0"              '' album cost
  139.   AddListItem CHK_ART01$, "ON"             '' dfg - default status for reinit
  140.  
  141.   CHK_ART02$ = "ChkArt02"
  142.   AddListItem DIA_ART$,    CHK_ART02$      '' add checkbox to dialog list
  143.   AddListItem CHK_ART02$, "ON"             '' status
  144.   AddListItem CHK_ART02$, "ON"             '' temp status -- used for dialogs
  145.   AddListItem CHK_ART02$, "ART02"          '' file section in LYT/INF file
  146.   AddListItem CHK_ART02$, "302"            '' dialog template ID
  147.   AddListItem CHK_ART02$, "0"              '' disk cost of checked item
  148.   AddListItem CHK_ART02$, "alb02.alb"      '' name of category album
  149.   AddListItem CHK_ART02$, "alb02"          '' LYT/INF section for album file
  150.   AddListItem CHK_ART02$, "0"              '' album cost
  151.   AddListItem CHK_ART02$, "ON"             '' dfg - default status for reinit
  152.  
  153.   CHK_ART03$ = "ChkArt03"
  154.   AddListItem DIA_ART$,    CHK_ART03$      '' add checkbox to dialog list
  155.   AddListItem CHK_ART03$, "ON"             '' status
  156.   AddListItem CHK_ART03$, "ON"             '' temp status -- used for dialogs
  157.   AddListItem CHK_ART03$, "ART03"          '' file section in LYT/INF file
  158.   AddListItem CHK_ART03$, "303"            '' dialog template ID
  159.   AddListItem CHK_ART03$, "0"              '' disk cost of checked item
  160.   AddListItem CHK_ART03$, "alb03.alb"      '' name of category album
  161.   AddListItem CHK_ART03$, "alb03"          '' LYT/INF section for album file
  162.   AddListItem CHK_ART03$, "0"              '' album cost
  163.   AddListItem CHK_ART03$, "ON"             '' dfg - default status for reinit
  164.  
  165.   CHK_ART04$ = "ChkArt04"
  166.   AddListItem DIA_ART$,    CHK_ART04$      '' add checkbox to dialog list
  167.   AddListItem CHK_ART04$, "ON"             '' status
  168.   AddListItem CHK_ART04$, "ON"             '' temp status -- used for dialogs
  169.   AddListItem CHK_ART04$,  "ART04"          '' file section in LYT/INF file
  170.   AddListItem CHK_ART04$, "304"            '' dialog template ID
  171.   AddListItem CHK_ART04$, "0"              '' disk cost of checked item
  172.   AddListItem CHK_ART04$, "alb04.alb"      '' name of category album
  173.   AddListItem CHK_ART04$, "alb04"          '' LYT/INF section for album file
  174.   AddListItem CHK_ART04$, "0"              '' album cost
  175.   AddListItem CHK_ART04$, "ON"             '' dfg - default status for reinit
  176.  
  177.   CHK_ART05$ = "ChkArt05"
  178.   AddListItem DIA_ART$,    CHK_ART05$      '' add checkbox to dialog list
  179.   AddListItem CHK_ART05$, "ON"             '' status
  180.   AddListItem CHK_ART05$, "ON"             '' temp status -- used for dialogs
  181.   AddListItem CHK_ART05$, "ART05"          '' file section in LYT/INF file
  182.   AddListItem CHK_ART05$, "305"            '' dialog template ID
  183.   AddListItem CHK_ART05$, "0"              '' disk cost of checked item
  184.   AddListItem CHK_ART05$, "alb05.alb"      '' name of category album
  185.   AddListItem CHK_ART05$, "alb05"          '' LYT/INF section for album file
  186.   AddListItem CHK_ART05$, "0"              '' album cost
  187.   AddListItem CHK_ART05$, "ON"             '' dfg - default status for reinit
  188.  
  189.   CHK_ART06$ = "ChkArt06"
  190.   AddListItem DIA_ART$,   CHK_ART06$      '' add checkbox to dialog list
  191.   AddListItem CHK_ART06$, "ON"             '' status
  192.   AddListItem CHK_ART06$, "ON"             '' temp status -- used for dialogs
  193.   AddListItem CHK_ART06$, "ART06"          '' file section in LYT/INF file
  194.   AddListItem CHK_ART06$, "306"            '' dialog template ID
  195.   AddListItem CHK_ART06$, "0"              '' disk cost of checked item
  196.   AddListItem CHK_ART06$, "alb06.alb"      '' name of category album
  197.   AddListItem CHK_ART06$, "alb06"          '' LYT/INF section for album file
  198.   AddListItem CHK_ART06$, "0"              '' album cost
  199.   AddListItem CHK_ART06$, "ON"             '' dfg - default status for reinit
  200.  
  201.   CHK_ART07$ = "ChkArt07"
  202.   AddListItem DIA_ART$,   CHK_ART07$      '' add checkbox to dialog list
  203.   AddListItem CHK_ART07$, "ON"             '' status
  204.   AddListItem CHK_ART07$, "ON"             '' temp status -- used for dialogs
  205.   AddListItem CHK_ART07$, "ART07"          '' file section in LYT/INF file
  206.   AddListItem CHK_ART07$, "307"            '' dialog template ID
  207.   AddListItem CHK_ART07$, "0"              '' disk cost of checked item
  208.   AddListItem CHK_ART07$, "alb07.alb"      '' name of category album
  209.   AddListItem CHK_ART07$, "alb07"          '' LYT/INF section for album file
  210.   AddListItem CHK_ART07$, "0"              '' album cost
  211.   AddListItem CHK_ART07$, "ON"             '' dfg - default status for reinit
  212.  
  213.   CHK_ART08$ = "ChkArt08"
  214.   AddListItem DIA_ART$,   CHK_ART08$      '' add checkbox to dialog list
  215.   AddListItem CHK_ART08$, "ON"             '' status
  216.   AddListItem CHK_ART08$, "ON"             '' temp status -- used for dialogs
  217.   AddListItem CHK_ART08$, "ART08"          '' file section in LYT/INF file
  218.   AddListItem CHK_ART08$, "308"            '' dialog template ID
  219.   AddListItem CHK_ART08$, "0"              '' disk cost of checked item
  220.   AddListItem CHK_ART08$, "alb08.alb"      '' name of category album
  221.   AddListItem CHK_ART08$, "alb08"          '' LYT/INF section for album file
  222.   AddListItem CHK_ART08$, "0"              '' album cost
  223.   AddListItem CHK_ART08$, "ON"             '' dfg - default status for reinit
  224.  
  225.   CHK_ART09$ = "ChkArt09"
  226.   AddListItem DIA_ART$,   CHK_ART09$      '' add checkbox to dialog list
  227.   AddListItem CHK_ART09$, "ON"             '' status
  228.   AddListItem CHK_ART09$, "ON"             '' temp status -- used for dialogs
  229.   AddListItem CHK_ART09$, "ART09"          '' file section in LYT/INF file
  230.   AddListItem CHK_ART09$, "309"            '' dialog template ID
  231.   AddListItem CHK_ART09$, "0"              '' disk cost of checked item
  232.   AddListItem CHK_ART09$, "alb09.alb"      '' name of category album
  233.   AddListItem CHK_ART09$, "alb09"          '' LYT/INF section for album file
  234.   AddListItem CHK_ART09$, "0"              '' album cost
  235.   AddListItem CHK_ART09$, "ON"             '' dfg - default status for reinit
  236.  
  237.   CHK_ART10$ = "ChkArt10"
  238.   AddListItem DIA_ART$,    CHK_ART10$      '' add checkbox to dialog list
  239.   AddListItem CHK_ART10$, "ON"             '' status
  240.   AddListItem CHK_ART10$, "ON"             '' temp status -- used for dialogs
  241.   AddListItem CHK_ART10$, "ART10"          '' file section in LYT/INF file
  242.   AddListItem CHK_ART10$, "310"            '' dialog template ID
  243.   AddListItem CHK_ART10$, "0"              '' disk cost of checked item
  244.   AddListItem CHK_ART10$, "alb10.alb"      '' name of category album
  245.   AddListItem CHK_ART10$, "alb10"          '' LYT/INF section for album file
  246.   AddListItem CHK_ART10$, "0"              '' album cost
  247.   AddListItem CHK_ART10$, "ON"             '' dfg - default status for reinit
  248.  
  249.   CHK_ART11$ = "ChkArt11"
  250.   AddListItem DIA_ART$,    CHK_ART11$      '' add checkbox to dialog list
  251.   AddListItem CHK_ART11$, "ON"             '' status
  252.   AddListItem CHK_ART11$, "ON"             '' temp status -- used for dialogs
  253.   AddListItem CHK_ART11$, "ART11"          '' file section in LYT/INF file
  254.   AddListItem CHK_ART11$, "311"            '' dialog template ID
  255.   AddListItem CHK_ART11$, "0"              '' disk cost of checked item
  256.   AddListItem CHK_ART11$, "alb11.alb"      '' name of category album
  257.   AddListItem CHK_ART11$, "alb11"          '' LYT/INF section for album file
  258.   AddListItem CHK_ART11$, "0"              '' album cost
  259.   AddListItem CHK_ART11$, "ON"             '' dfg - default status for reinit
  260.  
  261.   CHK_ART12$ = "ChkArt12"
  262.   AddListItem DIA_ART$,    CHK_ART12$      '' add checkbox to dialog list
  263.   AddListItem CHK_ART12$, "ON"             '' status
  264.   AddListItem CHK_ART12$, "ON"             '' temp status -- used for dialogs
  265.   AddListItem CHK_ART12$, "ART12"          '' file section in LYT/INF file
  266.   AddListItem CHK_ART12$, "312"            '' dialog template ID
  267.   AddListItem CHK_ART12$, "0"              '' disk cost of checked item
  268.   AddListItem CHK_ART12$, "alb12.alb"      '' name of category album
  269.   AddListItem CHK_ART12$, "alb12"          '' LYT/INF section for album file
  270.   AddListItem CHK_ART12$, "0"              '' album cost
  271.   AddListItem CHK_ART12$, "ON"             '' dfg - default status for reinit
  272.  
  273.   CHK_ART13$ = "ChkArt13"
  274.   AddListItem DIA_ART$,    CHK_ART13$      '' add checkbox to dialog list
  275.   AddListItem CHK_ART13$, "ON"             '' status
  276.   AddListItem CHK_ART13$, "ON"             '' temp status -- used for dialogs
  277.   AddListItem CHK_ART13$, "ART13"          '' file section in LYT/INF file
  278.   AddListItem CHK_ART13$, "313"            '' dialog template ID
  279.   AddListItem CHK_ART13$, "0"              '' disk cost of checked item
  280.   AddListItem CHK_ART13$, "alb13.alb"      '' name of category album
  281.   AddListItem CHK_ART13$, "alb13"          '' LYT/INF section for album file
  282.   AddListItem CHK_ART13$, "0"              '' album cost
  283.   AddListItem CHK_ART13$, "ON"             '' dfg - default status for reinit
  284.  
  285.   CHK_ART14$ = "ChkArt14"
  286.   AddListItem DIA_ART$,    CHK_ART14$      '' add checkbox to dialog list
  287.   AddListItem CHK_ART14$, "ON"             '' status
  288.   AddListItem CHK_ART14$, "ON"             '' temp status -- used for dialogs
  289.   AddListItem CHK_ART14$, "ART14"          '' file section in LYT/INF file
  290.   AddListItem CHK_ART14$, "314"            '' dialog template ID
  291.   AddListItem CHK_ART14$, "0"              '' disk cost of checked item
  292.   AddListItem CHK_ART14$, "alb14.alb"      '' name of category album
  293.   AddListItem CHK_ART14$, "alb14"          '' LYT/INF section for album file
  294.   AddListItem CHK_ART14$, "0"              '' album cost
  295.   AddListItem CHK_ART14$, "ON"             '' dfg - default status for reinit
  296.  
  297.   CHK_ART15$ = "ChkArt15"
  298.   AddListItem DIA_ART$,    CHK_ART15$      '' add checkbox to dialog list
  299.   AddListItem CHK_ART15$, "ON"             '' status
  300.   AddListItem CHK_ART15$, "ON"             '' temp status -- used for dialogs
  301.   AddListItem CHK_ART15$, "ART15"          '' file section in LYT/INF file
  302.   AddListItem CHK_ART15$, "315"            '' dialog template ID
  303.   AddListItem CHK_ART15$, "0"              '' disk cost of checked item
  304.   AddListItem CHK_ART15$, "alb15.alb"      '' name of category album
  305.   AddListItem CHK_ART15$, "alb15"          '' LYT/INF section for album file
  306.   AddListItem CHK_ART15$, "0"              '' album cost
  307.   AddListItem CHK_ART15$, "ON"             '' dfg - default status for reinit
  308.  
  309.   CHK_ART16$ = "ChkArt16"
  310.   AddListItem DIA_ART$,    CHK_ART16$      '' add checkbox to dialog list
  311.   AddListItem CHK_ART16$, "ON"             '' status
  312.   AddListItem CHK_ART16$, "ON"             '' temp status -- used for dialogs
  313.   AddListItem CHK_ART16$, "ART16"          '' file section in LYT/INF file
  314.   AddListItem CHK_ART16$, "316"            '' dialog template ID
  315.   AddListItem CHK_ART16$, "0"              '' disk cost of checked item
  316.   AddListItem CHK_ART16$, "alb16.alb"      '' name of category album
  317.   AddListItem CHK_ART16$, "alb16"          '' LYT/INF section for album file
  318.   AddListItem CHK_ART16$, "0"              '' album cost
  319.   AddListItem CHK_ART16$, "ON"             '' dfg - default status for reinit
  320.  
  321. END SUB
  322.  
  323. SUB ReInitArtDialogSymbols STATIC
  324.   '' get the cost of the CLIP ART
  325.   j% = GetListLength (DIA_ART$)
  326.   FOR i% = 1 to j% STEP 1
  327.      szChkSym$ = GetListItem (DIA_ART$, i%)
  328.      szDefaultStatus$ = GetListItem (szChkSym$, DEFAULT_STATUS)
  329.      ReplaceListItem szChkSym$, STATUS, szDefaultStatus$
  330.   NEXT i%
  331. END SUB
  332.  
  333. ''FUNCTION GetAlbumName STATIC AS STRING
  334. ''  '' get the name of the one and only album selected
  335. ''  j% = GetListLength (DIA_ART$)
  336. ''  FOR i% = 1 to j% STEP 1
  337. ''     szChkSym$ = GetListItem (DIA_ART$, i%)
  338. ''     szStatus$ = GetListItem (szChkSym$, STATUS)
  339. ''     IF (szStatus$ = _ON$) THEN
  340. ''       GetAlbumName = GetListItem (szChkSym$, ALBUM)
  341. ''     ENDIF
  342. ''  NEXT i%
  343. ''END FUNCTION
  344.  
  345. FUNCTION GetDriveName(szPath$) STATIC AS STRING
  346.  
  347.   szTemp$ = szPath$
  348.  
  349.   x% = INSTR(szPath$, ":")
  350.   if x%>0 then
  351.     szTemp$ = MakePath (MID$ (szPath$, 1, x%), "")
  352.   endif
  353.  
  354.   GetDriveName = szTemp$
  355.  
  356. END FUNCTION
  357.